package cn.stylefeng.guns.modular.hx.storage.mapper;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.hx.storage.entity.HxCollectingCenter;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxCollectingCenterParam;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxCollectionLocationParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxCollectingCenterResult;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxCollectionLocationResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lww
 * @since 2024-01-02
 */
public interface HxCollectingCenterMapper extends BaseMapper<HxCollectingCenter> {

    /**
     * 获取列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    List<HxCollectingCenterResult> customList(@Param("paramCondition") HxCollectingCenterParam paramCondition);

    /**
     * 获取map列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HxCollectingCenterParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    Page<HxCollectingCenterResult> customPageList(@Param("page") Page page, @Param("paramCondition") HxCollectingCenterParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author lww
     * @Date 2024-01-02
     */

    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HxCollectingCenterParam paramCondition);

//     @Select("SELECT s.`stock_port`,od.`location` FROM hx_collecting_center s LEFT JOIN hx_collection_location od ON s.`stock_port_id` = od.`stock_port_id`")
   List<HxCollectionLocationResult> cha(@Param("paramCondition")HxCollectingCenterParam hxCollectingCenterParam);

    void updateBySpec(@Param("paramCondition")HxCollectingCenterParam hxCollectingCenterParam);

    void insertStockPort(@Param("paramCondition")HxCollectingCenterParam hxCollectingCenterParam);

    void insertCollectionLocation(@Param("paramCondition")HxCollectionLocationParam hxCollectionLocationParam);

    Long chaStockPortId(@Param("paramCondition")HxCollectingCenterParam hxCollectingCenterParam);


}
